wayland: request appropriate compositor version to support buffer scale
authorRob Bradford <rob@linux.intel.com>
Tue, 9 Jul 2013 09:04:12 +0000 (10:04 +0100)
committerRob Bradford <rob@linux.intel.com>
Tue, 9 Jul 2013 09:11:58 +0000 (10:11 +0100)
With the introduction of the use of buffer scaling in ed4fcee4ct we
must request version 3 of the compositor as that is the version of the
surface interface that adds this new functionality. See the following
commit in weston:

commit a85118c1b85df6fbf8f896dca971a5b79a94da71
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Thu Jun 27 20:17:02 2013 -0500

    Use wl_resource_create() for creating resources

    This commit sets the version numbers for all added/created objects.  The
    wl_compositor.create_surface implementation was altered to create a surface
    with the same version as the underlying wl_compositor.  Since no other
    "child interfaces" have version greater than 1, they were all hard-coded to
    version 1.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
https://bugzilla.gnome.org/show_bug.cgi?id=703817

gdk/wayland/gdkdisplay-wayland.c

index 89504e844170d22d8fc9059543632eb8747385b1..cf3d812779531bd1afbf40425631316f038156d0 100644 (file)
@@ -156,7 +156,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
 
   if (strcmp(interface, "wl_compositor") == 0) {
     display_wayland->compositor =
-       wl_registry_bind(display_wayland->wl_registry, id, &wl_compositor_interface, 1);
+       wl_registry_bind(display_wayland->wl_registry, id, &wl_compositor_interface, 3);
   } else if (strcmp(interface, "wl_shm") == 0) {
    display_wayland->shm =
        wl_registry_bind(display_wayland->wl_registry, id, &wl_shm_interface, 1);